const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    devtool: 'source-map'
  },
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          javascriptEnabled: true
        },
        additionalData: `@import "~@/assets/styles/reset.less";`
      }
    }
  },
  devServer: {
    host: 'localhost',
    port: 8080,
    proxy: {
      '/gis': {
        // target: 'http://101.126.153.10:19994',
        // target: 'http://10.226.120.115:7070',
        target: 'http://47.98.147.221:18089',
        changeOrigin: true,
        pathRewrite: {
          '^/gis': ''
        }
      },
      '/demos': {
        // target: 'http://101.126.153.10:19994',
        // target: 'http://10.226.120.115:7070',
        target: 'http://47.98.147.221:18089',
        changeOrigin: true,
      },
      '/zhlq': {
        // target: 'http://10.226.107.205:8089',
        target: 'http://101.126.153.10:18090',
        changeOrigin: true,
      },
    }
  }
})
